package com.tong.hao.cron;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName HaoCronApp
 * @Author 友野浩二
 * @Date 2019/11/24 12:40
 * @Description 定时任务
 * @Version 1.0
 *
 * <pre>
 *     @EnableScheduling : 开启定时任务
 * </pre>
 */
@SpringBootApplication
@EnableScheduling
@Slf4j
@RestController
public class HaoCronApp {

    public static void main(String[] args) {
        SpringApplication.run(HaoCronApp.class, args);
        log.info("<<<<======== Tong Cron started ========>>>>");
    }

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String home() {
        return "Tong Cron started!!!";
    }

}
